import instance from '@/utils/request'

export function getloginCaptcha () {
  return instance('/api/login/captcha')
}

export function userLogin (from) {
  return instance.post('/api/login', {
    username: from.userName,
    password: from.password,
    captchaKey: from.codeKey,
    captchaCode: from.code
  })
}

export function info () {
  return instance('/api/admin/info')
}
